import React, { useCallback, useDebugValue, useDeferredValue, useId, useMemo, useState, useTransition } from 'react'

const App = () => {

  // 通过 useId 来创建一个 id,可以用来做元素的标记
  const myid = useId()

    return (
      <div >
        App 

        <label htmlFor={myid}>
          密码:
        </label>
       <input id={myid} />

      <button onClick={()=>{
        console.log(document.getElementById(':r0:'));
        document.getElementById(myid).style.color = 'red'
      }}>获取 myid 的元素</button>

      </div>
  )
}

export default App